home *** CD-ROM | disk | FTP | other *** search
/ Deutsche Edition 1 / Deutsche Edition 1.iso / amok / 081-090 / amok88 / arexxbox / rxif.lha / rxif / rx_alias.c < prev    next >
C/C++ Source or Header  |  1993-05-16  |  1KB  |  56 lines

  1.  
  2. /*
  3.  * Pendant zu dieser Interface-Funktion ist die Routine
  4.  *
  5.  *     char *ExpandRXCommand( struct RexxHost *host, char *command );
  6.  *
  7.  * welche vom Parser bei unbekannten Kommandos aufgerufen wird.
  8.  *
  9.  * Dieses Kommando sollte auch zwischen lokalen und globalen
  10.  * Aliases unterscheiden können. Vorschlag: Zusätzlicher Switch
  11.  * "GLOBAL/S" (Default wäre damit LOKAL).
  12.  *
  13.  */
  14.  
  15. /* Implementation von Aliases kommt im nächsten Release */
  16.  
  17.  
  18. #ifndef RX_ALIAS_C
  19. #define RX_ALIAS_C
  20.  
  21. char *ExpandRXCommand( struct RexxHost *host, char *command )
  22. {
  23.     return( NULL );
  24. }
  25.  
  26. #endif
  27.  
  28.  
  29. void rx_alias( struct RexxHost *host, struct rxd_alias **rxd, long action, struct RexxMsg *rexxmsg )
  30. {
  31.     struct rxd_alias *rd = *rxd;
  32.  
  33.     switch( action )
  34.     {
  35.         case RXIF_INIT:
  36.             *rxd = calloc( sizeof *rd, 1 );
  37.             if( rd = *rxd )
  38.             {
  39.                 /* set your DEFAULTS here */
  40.             }
  41.             break;
  42.             
  43.         case RXIF_ACTION:
  44.             /* Insert your code HERE */
  45.             rd->rc = 0;
  46.             break;
  47.         
  48.         case RXIF_FREE:
  49.             /* FREE your local data HERE */
  50.             free( rd );
  51.             break;
  52.     }
  53.     return;
  54. }
  55.  
  56.